home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / general / modelers / geomview / source.lha / Geomview / include / bboxP.h < prev    next >
C/C++ Source or Header  |  1992-02-25  |  1KB  |  43 lines

  1. /* Copyright (c) 1992 The Geometry Center; University of Minnesota
  2.    1300 South Second Street;  Minneapolis, MN  55454, USA;
  3.    
  4. This file is part of geomview/OOGL. geomview/OOGL is free software;
  5. you can redistribute it and/or modify it only under the terms given in
  6. the file COPYING, which you should have received along with this file.
  7. This and other related software may be obtained via anonymous ftp from
  8. geom.umn.edu; email: software@geom.umn.edu. */
  9.  
  10. /* Authors: Charlie Gunn, Stuart Levy, Tamara Munzner, Mark Phillips */
  11.  
  12. #ifndef    BBOXPDEF
  13. #define BBOXPDEF
  14.  
  15. #include "geomclass.h"
  16. #include "bbox.h"
  17.  
  18. /*
  19.  * The vert[] array lists vertices, indexed by binary order of initial axes,
  20.  * where X has weight 1, Y weight 2, Z weight 4.
  21.  * Initially "min" corresponds to 0, "max" to 1.
  22.  * Specifically GeomCreate("bbox", CR_MIN, min, CR_MAX, max) makes a bbox with:
  23.  *  vert[0] = (min.x, min.y, min.z)
  24.  *  vert[1] = (max.x, min.y, min.z)
  25.  *  vert[2] = (min.x, max.y, min.z) ...
  26.  *  vert[7] = (max.x, max.y, max.z).
  27.  * Note this property isn't necessarily preserved if the bbox is transformed.
  28.  */
  29.  
  30. #define BBOX_P VERT_P
  31. /* we allow BBOX_4D's.  This would be drawn as a hypercube, having
  32.    16 vertices */
  33. #define BBOX_4D VERT_4D
  34.  
  35. struct BBox {
  36.     GEOMFIELDS
  37.     int             flag;
  38.     HPoint3        min, max;
  39. };
  40.  
  41. #endif /* ! BBOXPDEF */
  42.  
  43.